package com.ag.bean;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbEvent entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_EVENT", schema = "dbo", catalog = "AGDB")
public class TbEvent implements java.io.Serializable {

	// Fields

	private String EId;
	private TbEventLevel tbEventLevel;
	private TbUser tbUserByUId;
	private TbEventSource tbEventSource;
	private TbEventType tbEventType;
	private TbEventStatus tbEventStatus;
	private TbUser tbUserByTbUId;
	private TbPhoneRecord tbPhoneRecord;
	private String EEventname;
	private Date EEventtime;
	private String EEventAddr;
	private String ELongitude;
	private String ELatitude;
	private String EEventCause;
	private String EEventDesc;
	private String ETakeMeasure;
	private Integer EDeaths;
	private Integer EInjuries;
	private String ESubmiter;
	private String ESubmitDept;
	private String ESubmiterContact;
	private Date ESubmitTime;
	private Date EAcceptTime;
	private String ENotifyLeader;
	private String a;
	private String b;
	/**
	 * 2011年5月，把C改为录音URL
	 */
	private String c;
	/**
	 * 新增预案自定义原因字段，dgm
	 */
	private String planReason;
	
	@Column(name = "PLAN_REASON", length = 4000)
	public String getPlanReason() {
		return planReason;
	}

	public void setPlanReason(String planReason) {
		this.planReason = planReason;
	}

	private Set<TbEventPlanStart> tbEventPlanStarts = new HashSet<TbEventPlanStart>(
			0);
	private Set<TbLogPlanStep> tbLogPlanSteps = new HashSet<TbLogPlanStep>(0);
	private Set<TbLog> tbLogs = new HashSet<TbLog>(0);
	private Set<TbPropose> tbProposes = new HashSet<TbPropose>(0);
	private Set<TbTask> tbTasks = new HashSet<TbTask>(0);
	private Set<TbEventReport> tbEventReports = new HashSet<TbEventReport>(0);
	private Set<TbEventmackup> tbEventmackups = new HashSet<TbEventmackup>(0);
	private Set<TbDisposalAdvice> tbDisposalAdvices = new HashSet<TbDisposalAdvice>(
			0);
	private Set<TbEventPlan> tbEventPlans = new HashSet<TbEventPlan>(0);
	private Set<TbTarget> tbTargets = new HashSet<TbTarget>(0);
	private Set<TbUserRole> tbUserRoles = new HashSet<TbUserRole>(0);
	private Set<TbEventCleanup> tbEventCleanups = new HashSet<TbEventCleanup>(0);
	private Set<TbEventGrade> tbEventGrades = new HashSet<TbEventGrade>(0);
	private Set<TbCurrentEvent> tbCurrentEvents = new HashSet<TbCurrentEvent>(0);
	private Set<TbEventInfect> tbEventInfects = new HashSet<TbEventInfect>(0);

	// Constructors

	/** default constructor */
	public TbEvent() {
	}

	/** minimal constructor */
	public TbEvent(String EId, TbEventType tbEventType,
			TbEventStatus tbEventStatus, String EEventname, Date EEventtime,
			String EEventAddr, String ESubmiter, String ESubmiterContact,
			Date ESubmitTime, Date EAcceptTime) {
		this.EId = EId;
		this.tbEventType = tbEventType;
		this.tbEventStatus = tbEventStatus;
		this.EEventname = EEventname;
		this.EEventtime = EEventtime;
		this.EEventAddr = EEventAddr;
		this.ESubmiter = ESubmiter;
		this.ESubmiterContact = ESubmiterContact;
		this.ESubmitTime = ESubmitTime;
		this.EAcceptTime = EAcceptTime;
	}

	/** full constructor */
	public TbEvent(String EId, TbEventLevel tbEventLevel, TbUser tbUserByUId,
			TbEventSource tbEventSource, TbEventType tbEventType,
			TbEventStatus tbEventStatus, TbUser tbUserByTbUId,
			TbPhoneRecord tbPhoneRecord, String EEventname, Date EEventtime,
			String EEventAddr, String ELongitude, String ELatitude,
			String EEventCause, String EEventDesc, String ETakeMeasure,
			Integer EDeaths, Integer EInjuries, String ESubmiter,
			String ESubmitDept, String ESubmiterContact, Date ESubmitTime,
			Date EAcceptTime, String ENotifyLeader, String a, String b,
			String c, Set<TbEventPlanStart> tbEventPlanStarts,
			Set<TbLogPlanStep> tbLogPlanSteps, Set<TbLog> tbLogs,
			Set<TbPropose> tbProposes, Set<TbTask> tbTasks,
			Set<TbEventReport> tbEventReports,
			Set<TbEventmackup> tbEventmackups,
			Set<TbDisposalAdvice> tbDisposalAdvices,
			Set<TbEventPlan> tbEventPlans, Set<TbTarget> tbTargets,
			Set<TbUserRole> tbUserRoles, Set<TbEventCleanup> tbEventCleanups,
			Set<TbEventGrade> tbEventGrades,
			Set<TbCurrentEvent> tbCurrentEvents,
			Set<TbEventInfect> tbEventInfects) {
		this.EId = EId;
		this.tbEventLevel = tbEventLevel;
		this.tbUserByUId = tbUserByUId;
		this.tbEventSource = tbEventSource;
		this.tbEventType = tbEventType;
		this.tbEventStatus = tbEventStatus;
		this.tbUserByTbUId = tbUserByTbUId;
		this.tbPhoneRecord = tbPhoneRecord;
		this.EEventname = EEventname;
		this.EEventtime = EEventtime;
		this.EEventAddr = EEventAddr;
		this.ELongitude = ELongitude;
		this.ELatitude = ELatitude;
		this.EEventCause = EEventCause;
		this.EEventDesc = EEventDesc;
		this.ETakeMeasure = ETakeMeasure;
		this.EDeaths = EDeaths;
		this.EInjuries = EInjuries;
		this.ESubmiter = ESubmiter;
		this.ESubmitDept = ESubmitDept;
		this.ESubmiterContact = ESubmiterContact;
		this.ESubmitTime = ESubmitTime;
		this.EAcceptTime = EAcceptTime;
		this.ENotifyLeader = ENotifyLeader;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbEventPlanStarts = tbEventPlanStarts;
		this.tbLogPlanSteps = tbLogPlanSteps;
		this.tbLogs = tbLogs;
		this.tbProposes = tbProposes;
		this.tbTasks = tbTasks;
		this.tbEventReports = tbEventReports;
		this.tbEventmackups = tbEventmackups;
		this.tbDisposalAdvices = tbDisposalAdvices;
		this.tbEventPlans = tbEventPlans;
		this.tbTargets = tbTargets;
		this.tbUserRoles = tbUserRoles;
		this.tbEventCleanups = tbEventCleanups;
		this.tbEventGrades = tbEventGrades;
		this.tbCurrentEvents = tbCurrentEvents;
		this.tbEventInfects = tbEventInfects;
	}

	// Property accessors
	@Id
	@Column(name = "E_ID", unique = true, nullable = false, length = 20)
	public String getEId() {
		return this.EId;
	}

	public void setEId(String EId) {
		this.EId = EId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "EL_ID")
	public TbEventLevel getTbEventLevel() {
		return this.tbEventLevel;
	}

	public void setTbEventLevel(TbEventLevel tbEventLevel) {
		this.tbEventLevel = tbEventLevel;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "U_ID")
	public TbUser getTbUserByUId() {
		return this.tbUserByUId;
	}

	public void setTbUserByUId(TbUser tbUserByUId) {
		this.tbUserByUId = tbUserByUId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ES_ID")
	public TbEventSource getTbEventSource() {
		return this.tbEventSource;
	}

	public void setTbEventSource(TbEventSource tbEventSource) {
		this.tbEventSource = tbEventSource;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ET_ID", nullable = false)
	public TbEventType getTbEventType() {
		return this.tbEventType;
	}

	public void setTbEventType(TbEventType tbEventType) {
		this.tbEventType = tbEventType;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TBES_ID", nullable = false)
	public TbEventStatus getTbEventStatus() {
		return this.tbEventStatus;
	}

	public void setTbEventStatus(TbEventStatus tbEventStatus) {
		this.tbEventStatus = tbEventStatus;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TB_U_ID")
	public TbUser getTbUserByTbUId() {
		return this.tbUserByTbUId;
	}

	public void setTbUserByTbUId(TbUser tbUserByTbUId) {
		this.tbUserByTbUId = tbUserByTbUId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PR_ID")
	public TbPhoneRecord getTbPhoneRecord() {
		return this.tbPhoneRecord;
	}

	public void setTbPhoneRecord(TbPhoneRecord tbPhoneRecord) {
		this.tbPhoneRecord = tbPhoneRecord;
	}

	@Column(name = "E_EVENTNAME", nullable = false, length = 60)
	public String getEEventname() {
		return this.EEventname;
	}

	public void setEEventname(String EEventname) {
		this.EEventname = EEventname;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "E_EVENTTIME", nullable = false, length = 23)
	public Date getEEventtime() {
		return this.EEventtime;
	}

	public void setEEventtime(Date EEventtime) {
		this.EEventtime = EEventtime;
	}

	@Column(name = "E_EVENT_ADDR", nullable = false, length = 100)
	public String getEEventAddr() {
		return this.EEventAddr;
	}

	public void setEEventAddr(String EEventAddr) {
		this.EEventAddr = EEventAddr;
	}

	@Column(name = "E_LONGITUDE", length = 20)
	public String getELongitude() {
		return this.ELongitude;
	}

	public void setELongitude(String ELongitude) {
		this.ELongitude = ELongitude;
	}

	@Column(name = "E_LATITUDE", length = 20)
	public String getELatitude() {
		return this.ELatitude;
	}

	public void setELatitude(String ELatitude) {
		this.ELatitude = ELatitude;
	}

	@Column(name = "E_EVENT_CAUSE", length = 1024)
	public String getEEventCause() {
		return this.EEventCause;
	}

	public void setEEventCause(String EEventCause) {
		this.EEventCause = EEventCause;
	}

	@Column(name = "E_EVENT_DESC", length = 1024)
	public String getEEventDesc() {
		return this.EEventDesc;
	}

	public void setEEventDesc(String EEventDesc) {
		this.EEventDesc = EEventDesc;
	}

	@Column(name = "E_TAKE_MEASURE", length = 1024)
	public String getETakeMeasure() {
		return this.ETakeMeasure;
	}

	public void setETakeMeasure(String ETakeMeasure) {
		this.ETakeMeasure = ETakeMeasure;
	}

	@Column(name = "E_DEATHS")
	public Integer getEDeaths() {
		return this.EDeaths;
	}

	public void setEDeaths(Integer EDeaths) {
		this.EDeaths = EDeaths;
	}

	@Column(name = "E_INJURIES")
	public Integer getEInjuries() {
		return this.EInjuries;
	}

	public void setEInjuries(Integer EInjuries) {
		this.EInjuries = EInjuries;
	}

	@Column(name = "E_SUBMITER", nullable = false, length = 20)
	public String getESubmiter() {
		return this.ESubmiter;
	}

	public void setESubmiter(String ESubmiter) {
		this.ESubmiter = ESubmiter;
	}

	@Column(name = "E_SUBMIT_DEPT", length = 60)
	public String getESubmitDept() {
		return this.ESubmitDept;
	}

	public void setESubmitDept(String ESubmitDept) {
		this.ESubmitDept = ESubmitDept;
	}

	@Column(name = "E_SUBMITER_CONTACT", nullable = false, length = 60)
	public String getESubmiterContact() {
		return this.ESubmiterContact;
	}

	public void setESubmiterContact(String ESubmiterContact) {
		this.ESubmiterContact = ESubmiterContact;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "E_SUBMIT_TIME", nullable = false, length = 23)
	public Date getESubmitTime() {
		return this.ESubmitTime;
	}

	public void setESubmitTime(Date ESubmitTime) {
		this.ESubmitTime = ESubmitTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "E_ACCEPT_TIME", nullable = false, length = 23)
	public Date getEAcceptTime() {
		return this.EAcceptTime;
	}

	public void setEAcceptTime(Date EAcceptTime) {
		this.EAcceptTime = EAcceptTime;
	}

	@Column(name = "E_NOTIFY_LEADER", length = 2)
	public String getENotifyLeader() {
		return this.ENotifyLeader;
	}

	public void setENotifyLeader(String ENotifyLeader) {
		this.ENotifyLeader = ENotifyLeader;
	}

	@Column(name = "A", length = 60)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 60)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 60)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEvent")
	public Set<TbEventPlanStart> getTbEventPlanStarts() {
		return this.tbEventPlanStarts;
	}

	public void setTbEventPlanStarts(Set<TbEventPlanStart> tbEventPlanStarts) {
		this.tbEventPlanStarts = tbEventPlanStarts;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEvent")
	public Set<TbLogPlanStep> getTbLogPlanSteps() {
		return this.tbLogPlanSteps;
	}

	public void setTbLogPlanSteps(Set<TbLogPlanStep> tbLogPlanSteps) {
		this.tbLogPlanSteps = tbLogPlanSteps;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEvent")
	public Set<TbLog> getTbLogs() {
		return this.tbLogs;
	}

	public void setTbLogs(Set<TbLog> tbLogs) {
		this.tbLogs = tbLogs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEvent")
	public Set<TbPropose> getTbProposes() {
		return this.tbProposes;
	}

	public void setTbProposes(Set<TbPropose> tbProposes) {
		this.tbProposes = tbProposes;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEvent")
	public Set<TbTask> getTbTasks() {
		return this.tbTasks;
	}

	public void setTbTasks(Set<TbTask> tbTasks) {
		this.tbTasks = tbTasks;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEvent")
	public Set<TbEventReport> getTbEventReports() {
		return this.tbEventReports;
	}

	public void setTbEventReports(Set<TbEventReport> tbEventReports) {
		this.tbEventReports = tbEventReports;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEvent")
	public Set<TbEventmackup> getTbEventmackups() {
		return this.tbEventmackups;
	}

	public void setTbEventmackups(Set<TbEventmackup> tbEventmackups) {
		this.tbEventmackups = tbEventmackups;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEvent")
	public Set<TbDisposalAdvice> getTbDisposalAdvices() {
		return this.tbDisposalAdvices;
	}

	public void setTbDisposalAdvices(Set<TbDisposalAdvice> tbDisposalAdvices) {
		this.tbDisposalAdvices = tbDisposalAdvices;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEvent")
	public Set<TbEventPlan> getTbEventPlans() {
		return this.tbEventPlans;
	}

	public void setTbEventPlans(Set<TbEventPlan> tbEventPlans) {
		this.tbEventPlans = tbEventPlans;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEvent")
	public Set<TbTarget> getTbTargets() {
		return this.tbTargets;
	}

	public void setTbTargets(Set<TbTarget> tbTargets) {
		this.tbTargets = tbTargets;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEvent")
	public Set<TbUserRole> getTbUserRoles() {
		return this.tbUserRoles;
	}

	public void setTbUserRoles(Set<TbUserRole> tbUserRoles) {
		this.tbUserRoles = tbUserRoles;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEvent")
	public Set<TbEventCleanup> getTbEventCleanups() {
		return this.tbEventCleanups;
	}

	public void setTbEventCleanups(Set<TbEventCleanup> tbEventCleanups) {
		this.tbEventCleanups = tbEventCleanups;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEvent")
	public Set<TbEventGrade> getTbEventGrades() {
		return this.tbEventGrades;
	}

	public void setTbEventGrades(Set<TbEventGrade> tbEventGrades) {
		this.tbEventGrades = tbEventGrades;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEvent")
	public Set<TbCurrentEvent> getTbCurrentEvents() {
		return this.tbCurrentEvents;
	}

	public void setTbCurrentEvents(Set<TbCurrentEvent> tbCurrentEvents) {
		this.tbCurrentEvents = tbCurrentEvents;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbEvent")
	public Set<TbEventInfect> getTbEventInfects() {
		return this.tbEventInfects;
	}

	public void setTbEventInfects(Set<TbEventInfect> tbEventInfects) {
		this.tbEventInfects = tbEventInfects;
	}

}